package top.zsyle.movie.exception;

import lombok.Data;
@Data
public class GlobalException extends RuntimeException{

    private String code;

    public GlobalException() {
    }

    public GlobalException(String message) {
        super(message);
    }

    public GlobalException(String message,String code) {
        super(message);
        this.code = code;
    }

    public GlobalException(GlobalExceptionEnum  globalExceptionEnum) {
        super(globalExceptionEnum.getMessage());
        this.code = globalExceptionEnum.getCode();
    }

}
